package main.com.hjy.jdbc.service.impl;

import main.com.hjy.jdbc.dao.RoomInfoDao;
import main.com.hjy.jdbc.dao.impl.RoomInfoDaoImpl;
import main.com.hjy.jdbc.entity.RoomInfo;
import main.com.hjy.jdbc.service.RoomInfoService;

import java.util.List;


public class RoomInfoServiceImpl implements RoomInfoService {

    @Override
    public boolean addRoomInfo(RoomInfo roominfo) {
        RoomInfoDao roominfodao = new RoomInfoDaoImpl();
        return roominfodao.addRoomInfo(roominfo);
    }

    @Override
    public boolean deleteRoomInfo(RoomInfo roominfo) {
        RoomInfoDao roominfodao = new RoomInfoDaoImpl();
        return roominfodao.deleteRoomInfo(roominfo);
    }

    @Override
    public List<RoomInfo> queryAllRoomInfo() {
        RoomInfoDao roominfodao = new RoomInfoDaoImpl();
        return roominfodao.queryAllRoomInfo();
    }

    @Override
    public boolean updateRoomInfo(String roomid, String roomname, String roomtypeid, Double price, Integer status, Integer capacity) {
       RoomInfoDao roominfodao = new RoomInfoDaoImpl();
       return roominfodao.updateRoomInfo(roomid, roomname, roomtypeid, price, status, capacity);
    }



//    @Override
//    public boolean updateRoomInfo(String roomid,String roomname,String roomtypeid,Double price,Integer status,Integer capacity) {
//        RoomInfoDao roominfodao = new RoomInfoDaoImpl();
//        String roominfo = new String();
//        return roominfodao.updateRoomInfo(roominfo);
//    }

    //    @Override
//    public boolean addEmp(Emp emp) {
//        Emp2Dao empdao=new Emp2DaoImpl();
//        return empdao.addEmp(emp);
//    }

}
